1. Field of the Invention
The present invention relates to an image processing method and apparatus for processing image data by a plurality serially connected image processing blocks.
2. Description of the Related Art
An image processing apparatus has been disclosed in which image processing is executed by cascade (serially) connecting a plurality of image processing blocks between a command and data transmission unit 700 and reception unit 704, as illustrated in FIG. 7.
In FIG. 7, the transmission unit 700 multiplexes and transmits commands and data. Image processing blocks 701 to 703 execute image processing. From the image processing block 703 of the final stage the reception unit 704 receives a multiplexed command and data that is the result of processing. The reception unit 704 sends the transmission unit 700 an end signal 705 upon detecting completion of processing of a data group corresponding to a prescribed amount of data.
The operation of the image processing apparatus of FIG. 7 will be described with reference to the timing chart of FIG. 8. Reference numerals 800 denote the timing of an output from the transmission unit 700, and reference numerals 801 to 803 denote the timings of outputs from the image processing blocks 701 to 703, respectively.
First, a command for setting image processing parameters is transmitted from the transmission unit 700 to the image processing blocks 701 to 703, as indicated at 804. The transmitted command is propagated to each of the image processing blocks successively as indicated at 805 to 807. As a result, the setting of image processing parameters in each image processing block is carried out. Further, when data to undergo image processing is transmitted from the transmission unit 700, as indicated at 808, image processing is executed sequentially by the image processing blocks 701 to 703 as indicated at 809 to 811, respectively, after which the processed data is received by the reception unit 704.
The data 808 that is transmitted from the transmission unit 700 is transmitted in data units (by page, block or band, etc.). After the reception unit 704 senses the end position of such a data unit, it transmits the end signal 705 to the transmission unit 700. Thereafter, the setting of image processing parameters with respect to the next unit of data is started (812 to 815) by the transmission unit 700 with respect to the image processing blocks 701 to 703, and the image processing operation is executed as indicated at 816 to 819.
However, the problem described below arises when a certain image processing block among the plurality of these blocks executes processing, such as trimming processing, in which the amount of data output decreases in comparison with the amount of data input.
Assume that the image processing block 703 of the final stage in FIG. 7 executes processing (e.g., trimming processing) in which the amount of data output decreases in comparison with the amount of data input. In this case, there is the possibility that the image processing by the image processing block 703 will be completed earlier than the image processing in the image processing blocks 701, 702 and that the end signal 705 will be transmitted to the transmission unit 700 before the processing by the image processing blocks 701, 702 ends. In such case the setting of image processing parameters with regard to the next unit of data is started by the transmission unit 700 before the image processing operation of all image processing blocks ends.
When such a situation arises, internal sequencers of the image processing blocks can no longer operate normally and a normal image processing operation is no longer carried out.